package iceCream.core.base
{
	
	/**
	 * Project : IceCream
	 * ICObjectContainer
	 * @author 赵俊 <zhaojun@crop.the9.com>  
	 * $Id:$
	 * @version 1.0
	 */
	public class IC_Object3DContainer extends IC_Object3D
	{
		protected var _children:Vector.<IC_Object3D> = new Vector.<IC_Object3D>();
		
		public function IC_Object3DContainer()
		{
			super();
		}
		
		
		public function get children():Vector.<IC_Object3D>
		{
			return _children;
		}
		
		public function addChild(child:IC_Object3D)
		{
			_children.push(child);
			child.parent = this;
		}
		
		public function removeChild(child:IC_Object3D):IC_Object3D
		{
			var index:int = _children.indexOf(child);
			if(index != -1)
			{
				child.parent = null;
				return _children.splice(index,1);
			}
			return null;
		}

	}
} 
